home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / or.z / or
Encoding:
Text File  |  2002-10-03  |  4.0 KB  |  105 lines

  1. OR(3I)                                                Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      OORR - Computes logical sum
  6.  
  7. SSYYNNOOPPSSIISS
  8.      OORR (([II==]_i,,[JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran extension
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      OORR is an elemental function.  It accepts the following arguments:
  20.  
  21.      _i         Must be of type Boolean, integer, real, Cray pointer, or
  22.                logical.
  23.  
  24.      _j         Must be of type Boolean, integer, real, Cray pointer, or
  25.                logical.
  26.  
  27. NNOOTTEESS
  28.      This is an outmoded routine.  Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
  29.      _M_a_n_u_a_l, _V_o_l_u_m_e _3, for information about outmoded features and their
  30.      preferred standard alternatives.
  31.  
  32.      The name of this intrinsic cannot be passed as an argument.
  33.  
  34. CCAAUUTTIIOONNSS
  35.      Unexpected results can occur when Boolean functions are declared
  36.      external and then used with logical arguments.  The external Boolean
  37.      functions always treat their arguments as type Boolean and return a
  38.      Boolean result on UNICOS and UNICOS/mk systems.  On IRIX systems, they
  39.      return an integer result.
  40.  
  41. RREETTUURRNN VVAALLUUEESS
  42.      When given two arguments of type logical, OORR computes a logical sum
  43.      and returns a logical result.
  44.  
  45.      When given two arguments of type integer, real, Boolean, or pointer,
  46.      OORR computes a bit-wise logical sum and returns a Boolean result.  No
  47.      type conversion occurs.
  48.  
  49.      The following tables show both the logical sum and bit-wise logical
  50.      sum:
  51.  
  52.      -----------------------------------------------------------------
  53.         Logical        Logical           (Logical Variable 1) OORR
  54.       Variable 1     Variable 2           (Logical Variable 2)
  55.      -----------------------------------------------------------------
  56.            T              T                         T
  57.            T              F                         T
  58.            F              T                         T
  59.            F              F                         F
  60.      -----------------------------------------------------------------
  61.  
  62.  
  63.      --------------------------------------------------------------
  64.      Bit of        Bit of        (Bit of Variable 1) OORR
  65.      Variable 1    Variable 2    (Bit of Variable 2)
  66.      --------------------------------------------------------------
  67.           1             1                        1
  68.           1             0                        1
  69.           0             1                        1
  70.           0             0                        0
  71.      --------------------------------------------------------------
  72.  
  73. EEXXAAMMPPLLEESS
  74.      The following section of Fortran code shows the OORR function used with
  75.      two arguments of type logical:
  76.  
  77.           LOGICAL L1, L2, L3
  78.           ...
  79.           L3 = OR(L1,L2)
  80.  
  81.      The following section of Fortran code shows the OORR function used with
  82.      two arguments of type integer.  The bit patterns of the arguments and
  83.      result are also shown.  For clarity, only the rightmost 8 bits are
  84.      shown.
  85.  
  86.    INTEGER I1, I2, I3
  87.    I1 = 12
  88.    I2 = 10
  89.    ...
  90.    I3 = OR(I1,I2)
  91.  
  92.        -------------------------------     -------------------------------
  93.       | 0 |   |   |   |   |   |   |   |   | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
  94.        -------------------------------    -------------------------------
  95.                      I1                               I2
  96.  
  97.                      -------------------------------
  98.                     | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
  99.                     -------------------------------
  100.                                     I3
  101.  
  102. SSEEEE AALLSSOO
  103.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  104.      man page.
  105.